/*
 * Copyright (c) 2025 CAX Conversion Project
 */
package com.comac.ins.isfd.domain.bo;


import com.comac.ins.common.core.validate.AddGroup;
import com.comac.ins.common.core.validate.EditGroup;
import com.comac.ins.common.mybatis.core.domain.BaseEntity;
import com.comac.ins.isfd.constant.enums.OriginalPartCountCchekEnum;
import com.comac.ins.isfd.constant.enums.OriginalPartExitCchekEnum;
import com.comac.ins.isfd.constant.enums.OriginalPartVersionCchekEnum;
import com.comac.ins.isfd.domain.IsfdModelManagementPart;
import com.comac.ins.isfd.domain.vo.IsfdModelManagementPartVo;
import io.github.linpeilie.annotations.AutoMapper;
import io.github.linpeilie.annotations.AutoMappers;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 模型管理零件业务对象 isfd_model_management_part
 *
 * @author Lion Li
 * @date 2024-08-14
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMappers({
    @AutoMapper(target = IsfdModelManagementPart.class, reverseConvertGenerate = false),
    @AutoMapper(target = IsfdModelManagementPartVo.class, reverseConvertGenerate = false)
})
public class IsfdModelManagementPartBo extends BaseEntity {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = {EditGroup.class})
    private Long id;

    /**
     * 组件号
     */
    @NotBlank(message = "组件号不能为空", groups = {AddGroup.class, EditGroup.class})
    private String componentNumber;

    /**
     * 零件
     */
    @NotBlank(message = "零件不能为空", groups = {AddGroup.class, EditGroup.class})
    private String partName;

    /**
     * 版本号
     */
    @NotBlank(message = "版本号不能为空", groups = {AddGroup.class, EditGroup.class})
    private String versionNumber;

    /**
     * 零件编号
     */
    @NotBlank(message = "零件编号不能为空", groups = {AddGroup.class, EditGroup.class})
    private String partNumber;

    /**
     * 文件大小
     */
    @NotNull(message = "文件大小不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long fileSize;

    /**
     * 机型编号
     */
    @NotBlank(message = "机型编号不能为空", groups = {AddGroup.class, EditGroup.class})
    private String modelNumber;

    /**
     * 部段编号
     */
    @NotBlank(message = "部段编号不能为空", groups = {AddGroup.class, EditGroup.class})
    private String sectionNumber;

    /**
     * 机型名称
     */
    private String modelName;

    /**
     * 部段名称
     */
    private String sectionName;

    /**
     * 机型索引文件
     */
    @NotBlank(message = "机型索引文件不能为空", groups = {AddGroup.class, EditGroup.class})
    private String modelIndex;

    /**
     * 部段索引文件
     */
    @NotBlank(message = "部段索引文件不能为空", groups = {AddGroup.class, EditGroup.class})
    private String sectionIndex;

    /**
     * 组件索引文件
     */
    @NotBlank(message = "组件索引文件不能为空", groups = {AddGroup.class, EditGroup.class})
    private String componentIndex;

    /**
     * 索引路径
     */
    @NotBlank(message = "索引路径不能为空", groups = {AddGroup.class, EditGroup.class})
    private String indexPath;

    /**
     * 零件/外置文件名
     */
    @NotBlank(message = "零件/外置文件名不能为空", groups = {AddGroup.class, EditGroup.class})
    private String fileName;

    /**
     * 文件级别 ：MODEL("model", "机型"),SECTION("section", "部段"),COMPONENT("component", "组件");
     */
    @NotBlank(message = "文件级别（机型、部段、组件）不能为空", groups = {AddGroup.class, EditGroup.class})
    private String fileLevel;

    /**
     * 文件类型： PART("part", "零件"),EXTERNAL("external", "外置"),INDEX("index", "索引文件"),FASTENER("fastener", "紧固件");
     */
    @NotBlank(message = "文件类型（零件、外置、索引文件）不能为空", groups = {AddGroup.class, EditGroup.class})
    private String fileType;

    /**
     * 零件名称
     */
    private String name;

    /**
     * 数量
     */
    private Long amount;
    /**
     * 单位重量（KG）
     */
    private Double unitWeight;
    /**
     * 材料
     */
    private String material;

    /**
     * 备注信息
     */
    private String remarks;

    /**
     * 文件解析情况：EXIST(1, "该零组件已存在"),NOT_EXIST(2, "零组件不存在");
     */
    private Integer fileParsingStatus;

    /**
     * 导入操作标记：WAIT_FLAG(1, "待标记"),ABLE_IMPORT(2, "可导入"),NOT_IMPORT(3, "不导入"),UPDATED(4, "已修改");
     */
    private Integer importOperationTags;

    /**
     * 导入是否忽略：NOT_IGNORE(1, "不忽略"),IGNORE(2, "忽略")
     */
    private Integer ignoreFlag;

    /**
     * 是否修改： NOT_UPDATED(1, "未修改"), UPDATED(2, "修改过");
     */
    private Integer updatedFlag;


    /**
     * 批次号
     */
    private String batchNumber;
    /**
     * 1代表在原始清单中存在，0代表在原始清单中不存在
     */
    private Integer exitCheck = OriginalPartExitCchekEnum.EXIT.getValue();
    /**
     * 版本匹配与否
     * 1代表版本匹配通过，0代表版本匹配不通过
     */
    private Integer versionCheck = OriginalPartVersionCchekEnum.MATCH.getValue();
    /**
     * 原始清单的版本号
     */
    private String originalVersion;
    /**
     * 数量匹配与否
     * 1代表数量匹配通过，0代表数量匹配不通过
     */
    private Integer countCheck = OriginalPartCountCchekEnum.MATCH.getValue();
    /**
     * 导入零件的数量
     */
    private Long importCount;
    /**
     * 原始清单零件数量
     */
    private Long originalImportCount;

    /**
     * 机型架次
     */
    private String sortie;
}
